feat(integration): migrate MCP client to use direct API server calls#667
feat(integration): migrate MCP client to use direct API server calls#667naren-venhan wants to merge 1 commit intocoleam00:mainfrom
Conversation
- Replace streamable HTTP MCP protocol calls with direct REST API calls - Implement all MCP tool methods to call respective API server endpoints - Maintain backward compatibility with MCP tool interface - Add detailed error handling and logging for HTTP and unexpected errors - Update environment variable usage for MCP server URLs and backend service URLs - Enhance proxy and Vite config to support Azure Container Apps URLs - Refactor MCP server to include health check endpoints for external monitoring - Register new E-commerce and Specialized Crawling modules as HTTP-based MCP tools - Improve project data fetching to include associated docs and features on selection - Add support for switching tabs with data refreshing in ProjectPage component - Upgrade DocsTab component to handle absence of docs field gracefully and log info - Add specialized crawling API endpoints and crawling modes listing for enhanced crawling features - Revise Dockerfile for multi-stage build with production nginx serving and environment variables - Adjust document restoration API call to include additional body parameters for audit purposes
|
Caution Review failedThe pull request is closed. WalkthroughIntroduces Azure-focused deployment and configuration scripts, overhauls Archon UI build/runtime (Vite/nginx) and env handling, adds Smart Crawling frameworks (modes, detection, pagination, price intelligence), expands server APIs (smart crawl, knowledge, MCP cloud mode), updates service discovery for Azure, adds MCP modules/tools, modifies frontend components/services, and adds extensive SQL migrations and tests. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant UI as Frontend (archon-ui)
participant API as Archon API
participant Orchestrator as SmartCrawlingOrchestrator
participant Registry as ModeRegistry
participant Mode as Mode Instance
participant DB as Supabase
UI->>API: POST /api/smart-crawl/crawl (urls, source_id, [force_mode])
activate API
API->>Orchestrator: smart_crawl(urls, source_id, cb)
activate Orchestrator
Orchestrator->>Registry: detect_best_mode(url) for each
Registry-->>Orchestrator: mode assignments
Orchestrator->>Registry: create/get mode instances
loop per mode
Orchestrator->>Mode: crawl(url) with progress callbacks
Mode-->>Orchestrator: ExtractedData[]
end
Orchestrator->>DB: Store ecommerce/products, variants, sessions
Orchestrator-->>API: CrawlResult summary (ids, stats)
deactivate Orchestrator
API-->>UI: 202 Accepted {progress_id}
deactivate API
note over UI,API: UI polls socket/progress or endpoints for updates
sequenceDiagram
autonumber
participant UI as Frontend
participant API as MCP API Router
participant Disc as ServiceDiscovery
participant MCP as MCP Server (HTTP)
participant Docker as Docker (optional)
API->>Disc: detect environment
alt Cloud (Azure)
API->>MCP: GET /health (HTTP)
MCP-->>API: 200/starting
API-->>UI: status {mode: cloud, health}
UI->>API: POST /api/mcp/force-health-check
API->>MCP: GET /health (forced)
MCP-->>API: 200
API-->>UI: {healthy: true}
else Docker
API->>Docker: start/stop/status via container runtime
Docker-->>API: container state
API-->>UI: status {mode: docker, state}
end
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120+ minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (64)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Pull Request
Summary
Changes Made
Type of Change
Affected Services
Testing
Test Evidence
Checklist
Breaking Changes
Additional Notes
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores
Tests